<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%--
  Created by IntelliJ IDEA.
  User: lxf
  Date: 2016/4/19
  Time: 16:24
  To change this template use File | Settings | File Templates.
--%>
<html>
<head>
    <title>User Login</title>
    <style>
        .login_div {
            margin: 250px auto;
            width: 500px;
        }

        .error_tips {
            color: red;
        }
    </style>
    <meta name="_csrf" th:content="${_csrf.token}"/>
    <!-- default header name is X-CSRF-TOKEN -->
    <meta name="_csrf_header" th:content="${_csrf.headerName}"/>
</head>
<body>
<div class="login_div">
    <form:form autocomplete="false" commandName="userDTO" method="post">
        <div>
            <span class="error_tips"><b>${SPRING_SECURITY_LAST_EXCEPTION.message}</b></span>
        </div>
        <input type="hidden" name="targeUrl" value="${targeUrl}">
        username:<form:input path="username" cssClass="form-control"/><br/>
        password:<form:password path="password" cssClass="form-control"/><br/>
        validateCode:<form:input path="validateCode" cssClass="form-control"/>
        <label>${validate_code}</label>
        <div class="checkbox">
            <label>
                <input type="checkbox" name="remember-me"/>记住我
            </label>
        </div>
        <input type="submit" class="btn btn-primary" value="submit"/>
    </form:form>
</div>
</body>
</html>
